package weka.em;

public class ArraySort
{
   public static int [] arraySorting(double a[])
   {
	   double c[]=new double[a.length];
	   for(int i=0;i<c.length;i++)
	   {
		   c[i]=a[i];
	   }
	   
	   int b[]=new int [a.length];
	   for(int i=0;i<b.length;i++)
	   {
		   b[i]=i;
	   }
	   for(int i=0;i<c.length;i++)
	   {
		   for(int j=i;j<c.length;j++)
		   {
			   if(c[i]<c[j])
			   {
				   double tem=c[i];
				   c[i]=c[j];
				   c[j]=tem;
				   int t=b[i];
				   b[i]=b[j];
				   b[j]=t;
			   }
		   }
	   }
	   
	   
	   return b;
   }
}
